{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
<link rel="stylesheet" type="text/css" href="__STATIC__/easyui/themes/custom/easyui.css" />
<style>
/*.page_nav{height: 33px}
.edui-editor, .edui-editor-iframeholder {
    width: 790px !important;
}
.img_upload_wrp .img_upload_box.img_upload_preview_box{
    width:120px !important;
    height:120px !important;
}*/
</style>
<div class="box-content">
    <input type="hidden" name="id" id="id" value="{$id}"/>
    <div class="control-row col-2">
        <div class="control-group">
            <label class="control-label">任务包名称</label>
            <div class="controls">
                <input type="text" style="width:300px" id="equip_name" name="equip_name" placeholder="任务包名称" class="form-control required" />
            </div>
        </div>
        <div class="control-group" >
            <label class="control-label">任务包图片</label>
            <div class="controls">
                <div class="controls">
                    <div id="js_upload_wrp">
                        <input type="hidden" id="equip_img" name="equip_img" value="" class="" />
                        {:hook('picResource',array('name'=>'equip_img','checktype'=>1,'folder'=>'equip','tips'=>'建议尺寸：800x600像素。仅支持.jpg .png格式长方形照片，大小不超过1M。','callback'=>'uploadImgCallback'))}
                    </div>
                </div>
            </div>
        </div>
         <div class="control-group">
            <label class="control-label">最低价格</label>
            <div class="controls">
                <input type="number" style="width:300px" id="min_amount" name="min_amount" placeholder="最低价格" class="form-control required" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">最高价格</label>
            <div class="controls">
                <input type="number" style="width:300px" id="max_amount" name="max_amount" placeholder="最高价格" class="form-control required" />
            </div>
        </div> 
        <div class="control-group">
            <label class="control-label">收益比率</label>
            <div class="controls">
                <input type="number" style="width:300px" id="earnings_tax" name="earnings_tax" placeholder="收益比率" class="form-control required" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">有效天数</label>
            <div class="controls">
                <input type="number" style="width:300px" id="cycle_number" name="cycle_number" placeholder="有效天数" class="form-control required" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">日释放</label>
            <div class="controls">
                <input type="number" style="width:300px" id="days_release" name="days_release" placeholder="日释放" class="form-control required" />
            </div>
        </div> 
        <div class="control-group">
            <label class="control-label">算力值</label>
            <div class="controls">
                <input type="number" style="width:300px" id="hashrate_amount" name="hashrate_amount" placeholder="算力值" class="form-control required" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">限制数量</label>
            <div class="controls">
                <input type="number" style="width:300px" id="limit_num" name="limit_num" placeholder="限制数量" class="form-control required" />
            </div>
        </div>
        <!-- <div class="control-group">
            <label class="control-label">兑换类型</label>
            <div class="controls">
                <select name="exchange_type">
                    <option value="1">可兑换</option>
                    <option value="0">不可兑换</option>
                </select>
            </div>
        </div> -->
<!--        <div class="control-group">-->
<!--            <label class="control-label">排序</label>-->
<!--            <div class="controls">-->
<!--                <input type="number" style="width:300px" id="order_index" name="order_index" placeholder="越小越靠前" class="form-control required" />-->
<!--            </div>-->
<!--        </div>-->
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    //上传回调
    function uploadImgCallback(data) {
        console.log(data);
        $("#equip_img").val(data);
        setPicValue("equip_img",data);
    }

    

    function onLoadDataSuccess(data){
        if (typeof (onLoadSuccess) !== "undefined")
            onLoadSuccess();
        if (data.equip_img) {
            var images = data.equip_img;
            uploadImgCallback(images)
        }
    }
</script>
{/block}


